Function at 0x409190
Capabilities:
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84c
mov eax, dword [0x460df4]
xor eax, esp
mov dword [esp + 0x848], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x108]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x10], esi
je 0x4091e0
mov ecx, dword [edi + 0x10c]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x4091e5
call fcn.0043364c
mov eax, dword [edi + 0x108]
cmp dword [eax + 0x18], 0x10
jb 0x4091f6
mov eax, dword [eax + 4]
jmp 0x4091f9
add eax, 4
cmp eax, esi
je 0x409633
lea ebx, [edi + 0xe4]
mov dword [edi + 0xcc], esi
mov esi, dword [ebx + 4]
cmp esi, dword [ebx + 8]
jbe 0x40921a
call fcn.0043364c
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], 0
jmp 0x409230
mov eax, dword [edi + 0xec]
cmp dword [edi + 0xe8], eax
lea esi, [edi + 0xe4]
mov dword [esp + 0xc], eax
jbe 0x40924d
call fcn.0043364c
test ebx, ebx
je 0x409255
cmp ebx, esi
je 0x40925a
call fcn.0043364c
mov ecx, dword [esp + 0xc]
cmp dword [esp + 0x20], ecx
je 0x409910
test ebx, ebx
jne 0x409271
call fcn.0043364c
mov edx, dword [esp + 0x20]
cmp edx, dword [ebx + 8]
jb 0x40927f
call fcn.0043364c
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 4]
mov esi, dword [ecx]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
cmp eax, dword [edi + 0xec]
lea ebx, [edi + 0xe4]
jb 0x4092a7
call fcn.0043364c
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
test ecx, ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x4c], edx
je 0x4092ba
cmp ecx, eax
je 0x4092c3
call fcn.0043364c
mov eax, dword [esp + 0x20]
cmp esi, dword [esp + 0x4c]
je 0x4095bd
cmp dword [esp + 0x24], 0
jne 0x4092d9
call fcn.0043364c
mov eax, dword [esp + 0x24]
cmp esi, dword [eax + 4]
jne 0x4092e7
call fcn.0043364c
cmp dword [esi + 0x28], 0x10
jb 0x4092f2
mov eax, dword [esi + 0x14]
jmp 0x4092f5
lea eax, [esi + 0x14]
test eax, eax
je 0x4095a7
mov ecx, dword [esp + 0x24]
cmp esi, dword [ecx + 4]
jne 0x40930b
call fcn.0043364c
cmp dword [esi + 0x28], 0x10
jb 0x409316
mov edx, dword [esi + 0x14]
jmp 0x409319
lea edx, [esi + 0x14]
mov eax, edx
lea ebx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409320
sub eax, ebx
push eax
push edx
lea ecx, [edi + 0x78]
call fcn.00402e40
mov eax, dword [edi]
test eax, eax
je 0x409350
mov edx, dword [edi + 0xc0]
push 0
push edx
push 0x4402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x24]
cmp esi, dword [eax + 4]
jne 0x40935e
call fcn.0043364c
cmp dword [esi + 0x28], 0x10
jb 0x409369
mov eax, dword [esi + 0x14]
jmp 0x40936c
lea eax, [esi + 0x14]
push eax
lea ecx, [esp + 0x454]
push 0x44d3a4
push ecx
call fcn.004340f9
add esp, 0xc
lea edx, [esp + 0x450]
push edx
mov ecx, edi
call fcn.00407a60
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [esp + 0x468]
push eax
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x4093e1
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea ecx, [esp + 0x468]
push ecx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x4095eb
mov eax, dword [edi + 0x108]
test eax, eax
je 0x40940c
mov ecx, dword [edi + 0x10c]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x10], eax
jb 0x409411
call fcn.0043364c
mov eax, dword [edi + 0x108]
add eax, dword [esp + 0x18]
cmp dword [eax + 0x18], 0x10
jb 0x409426
mov eax, dword [eax + 4]
jmp 0x409429
add eax, 4
push 0x44cb3c
push eax
call fcn.00433b5c
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x409476
push ebx
push 2
lea edx, [esp + 0x1c]
push 1
push edx
mov byte [esp + 0x24], 0
mov word [esp + 0x25], 0
call fcn.00433dcc
push ebx
call fcn.00433875
add esp, 0x14
cmp byte [esp + 0x14], 0x57
jne 0x409476
cmp byte [esp + 0x15], 0x58
jne 0x409476
mov ebx, 1
jmp 0x409478
xor ebx, ebx
mov eax, dword [edi + 0x108]
test eax, eax
je 0x4094a3
mov ecx, dword [edi + 0x10c]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x10], eax
jb 0x4094a8
call fcn.0043364c
mov eax, dword [edi + 0x108]
add eax, dword [esp + 0x18]
cmp dword [eax + 0x18], 0x10
jb 0x4094bd
mov eax, dword [eax + 4]
jmp 0x4094c0
add eax, 4
push ebx
lea ecx, [esp + 0x38]
push ecx
push eax
call fcn.0040fad0
add esp, 0xc
cmp dword [esp + 0x34], 0
mov dword [esp + 0xc], eax
jne 0x40964c
push 0x11000
lea edx, [esp + 0x454]
push edx
push eax
call fcn.0040ef90
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x409700
mov eax, dword [esp + 0xc]
push 8
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x458]
push edx
push eax
call fcn.0040f200
add esp, 0x10
test eax, eax
jne 0x4097d0
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00416a1f
mov edi, eax
add esp, 4
test edi, edi
je 0x409850
mov edx, dword [esp + 0x40]
push edx
push edi
push ebx
call fcn.0040ee30
add esp, 0xc
cmp eax, dword [esp + 0x40]
push ebx
jne 0x4098b0
call fcn.0040ed30
mov eax, dword [esp + 0x10]
push eax
call fcn.0040f890
mov edx, dword [esp + 0x48]
add esp, 8
push 0
lea ecx, [esp + 0x34]
push ecx
push edx
push edi
push esi
mov dword [esp + 0x44], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00416a24
add esp, 4
test ebx, ebx
je 0x409633
push 0x12
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [esp + 0x2c]
lea ecx, [esp + 0x24]
call fcn.00407f80
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
jmp 0x409290
add dword [esp + 0x18], 0x1c
mov ecx, 1
add dword [edi + 0xcc], ecx
add dword [esp + 0x10], ecx
cmp eax, dword [ebx + 8]
jb 0x4095df
call fcn.0043364c
mov eax, dword [esp + 0x20]
add eax, 0xc
mov dword [esp + 0x20], eax
jmp 0x409230
lea eax, [esp + 0x450]
push eax
lea ecx, [esp + 0x54]
push 0x44d390
push ecx
call fcn.004340f9
lea eax, [esp + 0x5c]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409610
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409633
push edi
push eax
lea edx, [esp + 0x58]
push 1
push edx
call fcn.00433a0b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432bb9
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0x108]
test eax, eax
mov esi, dword [esp + 0x10]
je 0x409680
mov ecx, dword [edi + 0x10c]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x409685
call fcn.0043364c
mov ecx, dword [edi + 0x108]
lea eax, [esi*8]
sub eax, esi
cmp dword [ecx + eax*4 + 0x18], 0x10
lea eax, [ecx + eax*4]
jb 0x4096a3
mov eax, dword [eax + 4]
jmp 0x4096a6
add eax, 4
push eax
lea edx, [esp + 0x54]
push str.Khong_the_doc_path_file:__s_n
push edx
call fcn.004340f9
lea eax, [esp + 0x5c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4096c0
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409633
push edi
push eax
lea eax, [esp + 0x58]
push 1
push eax
call fcn.00433a0b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432bb9
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0xc]
push ecx
call fcn.0040f890
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0x108]
test eax, eax
mov esi, dword [esp + 0x10]
je 0x409741
mov ecx, dword [edi + 0x10c]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x409746
call fcn.0043364c
mov eax, dword [edi + 0x108]
lea edx, [esi*8]
sub edx, esi
cmp dword [eax + edx*4 + 0x18], 0x10
lea eax, [eax + edx*4]
jb 0x409764
mov eax, dword [eax + 4]
jmp 0x409767
add eax, 4
lea ecx, [esp + 0x450]
push ecx
push eax
lea edx, [esp + 0x58]
push 0x44d34c
push edx
call fcn.004340f9
lea eax, [esp + 0x60]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409790
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409633
push edi
push eax
lea eax, [esp + 0x58]
push 1
push eax
call fcn.00433a0b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432bb9
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.0040ed30
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040f890
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x450]
push edx
lea eax, [esp + 0x54]
push 0x44d338
push eax
call fcn.004340f9
lea eax, [esp + 0x5c]
add esp, 0xc
lea edx, [eax + 1]
jmp 0x409810
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409810
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409633
push edi
push eax
lea ecx, [esp + 0x58]
push 1
push ecx
call fcn.00433a0b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432bb9
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.0040ed30
mov edx, dword [esp + 0x10]
push edx
call fcn.0040f890
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call fcn.00416a24
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x58]
push 0x44d328
push ecx
call fcn.004340f9
lea eax, [esp + 0x60]
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409890
sub eax, edx
mov edx, dword [esp + 0x2c]
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x409633
push ecx
jmp 0x4096d7
call fcn.0040ed30
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040f890
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00416a24
lea edx, [esp + 0x454]
push edx
lea eax, [esp + 0x58]
push 0x44d338
push eax
call fcn.004340f9
lea eax, [esp + 0x60]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4098f0
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + 4]
sub eax, edx
test ecx, ecx
je 0x409633
push ecx
jmp 0x409623
mov ecx, dword [esp + 0x854]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00432bb9
mov esp, ebp
pop ebp
ret 4