Function at 0x409080
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 0x4090d0
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 0x4090d5
call fcn.004334ac
mov eax, dword [edi + 0x108]
cmp dword [eax + 0x18], 0x10
jb 0x4090e6
mov eax, dword [eax + 4]
jmp 0x4090e9
add eax, 4
cmp eax, esi
je 0x409523
lea ebx, [edi + 0xe4]
mov dword [edi + 0xcc], esi
mov esi, dword [ebx + 4]
cmp esi, dword [ebx + 8]
jbe 0x40910a
call fcn.004334ac
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], 0
jmp 0x409120
mov eax, dword [edi + 0xec]
cmp dword [edi + 0xe8], eax
lea esi, [edi + 0xe4]
mov dword [esp + 0xc], eax
jbe 0x40913d
call fcn.004334ac
test ebx, ebx
je 0x409145
cmp ebx, esi
je 0x40914a
call fcn.004334ac
mov ecx, dword [esp + 0xc]
cmp dword [esp + 0x20], ecx
je 0x409800
test ebx, ebx
jne 0x409161
call fcn.004334ac
mov edx, dword [esp + 0x20]
cmp edx, dword [ebx + 8]
jb 0x40916f
call fcn.004334ac
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 0x409197
call fcn.004334ac
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
test ecx, ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x4c], edx
je 0x4091aa
cmp ecx, eax
je 0x4091b3
call fcn.004334ac
mov eax, dword [esp + 0x20]
cmp esi, dword [esp + 0x4c]
je 0x4094ad
cmp dword [esp + 0x24], 0
jne 0x4091c9
call fcn.004334ac
mov eax, dword [esp + 0x24]
cmp esi, dword [eax + 4]
jne 0x4091d7
call fcn.004334ac
cmp dword [esi + 0x28], 0x10
jb 0x4091e2
mov eax, dword [esi + 0x14]
jmp 0x4091e5
lea eax, [esi + 0x14]
test eax, eax
je 0x409497
mov ecx, dword [esp + 0x24]
cmp esi, dword [ecx + 4]
jne 0x4091fb
call fcn.004334ac
cmp dword [esi + 0x28], 0x10
jb 0x409206
mov edx, dword [esi + 0x14]
jmp 0x409209
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 0x409210
sub eax, ebx
push eax
push edx
lea ecx, [edi + 0x78]
call fcn.00402d10
mov eax, dword [edi]
test eax, eax
je 0x409240
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 0x40924e
call fcn.004334ac
cmp dword [esi + 0x28], 0x10
jb 0x409259
mov eax, dword [esi + 0x14]
jmp 0x40925c
lea eax, [esi + 0x14]
push eax
lea ecx, [esp + 0x454]
push 0x44d3d0
push ecx
call fcn.00433f59
add esp, 0xc
lea edx, [esp + 0x450]
push edx
mov ecx, edi
call fcn.00407a30
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 0x4092d1
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 0x4094db
mov eax, dword [edi + 0x108]
test eax, eax
je 0x4092fc
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 0x409301
call fcn.004334ac
mov eax, dword [edi + 0x108]
add eax, dword [esp + 0x18]
cmp dword [eax + 0x18], 0x10
jb 0x409316
mov eax, dword [eax + 4]
jmp 0x409319
add eax, 4
push 0x44cb3c
push eax
call fcn.004339bc
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x409366
push ebx
push 2
lea edx, [esp + 0x1c]
push 1
push edx
mov byte [esp + 0x24], 0
mov word [esp + 0x25], 0
call fcn.00433c2c
push ebx
call fcn.004336d5
add esp, 0x14
cmp byte [esp + 0x14], 0x57
jne 0x409366
cmp byte [esp + 0x15], 0x58
jne 0x409366
mov ebx, 1
jmp 0x409368
xor ebx, ebx
mov eax, dword [edi + 0x108]
test eax, eax
je 0x409393
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 0x409398
call fcn.004334ac
mov eax, dword [edi + 0x108]
add eax, dword [esp + 0x18]
cmp dword [eax + 0x18], 0x10
jb 0x4093ad
mov eax, dword [eax + 4]
jmp 0x4093b0
add eax, 4
push ebx
lea ecx, [esp + 0x38]
push ecx
push eax
call fcn.0040f9c0
add esp, 0xc
cmp dword [esp + 0x34], 0
mov dword [esp + 0xc], eax
jne 0x40953c
push 0x11000
lea edx, [esp + 0x454]
push edx
push eax
call fcn.0040ee80
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4095f0
mov eax, dword [esp + 0xc]
push 8
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x458]
push edx
push eax
call fcn.0040f0f0
add esp, 0x10
test eax, eax
jne 0x4096c0
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0041688f
mov edi, eax
add esp, 4
test edi, edi
je 0x409740
mov edx, dword [esp + 0x40]
push edx
push edi
push ebx
call fcn.0040ed20
add esp, 0xc
cmp eax, dword [esp + 0x40]
push ebx
jne 0x4097a0
call fcn.0040ec20
mov eax, dword [esp + 0x10]
push eax
call fcn.0040f780
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.00416894
add esp, 4
test ebx, ebx
je 0x409523
push 0x12
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [esp + 0x2c]
lea ecx, [esp + 0x24]
call fcn.00407f50
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
jmp 0x409180
add dword [esp + 0x18], 0x1c
mov ecx, 1
add dword [edi + 0xcc], ecx
add dword [esp + 0x10], ecx
cmp eax, dword [ebx + 8]
jb 0x4094cf
call fcn.004334ac
mov eax, dword [esp + 0x20]
add eax, 0xc
mov dword [esp + 0x20], eax
jmp 0x409120
lea eax, [esp + 0x450]
push eax
lea ecx, [esp + 0x54]
push 0x44d3bc
push ecx
call fcn.00433f59
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 0x409500
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409523
push edi
push eax
lea edx, [esp + 0x58]
push 1
push edx
call fcn.0043386b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432a13
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 0x409570
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 0x409575
call fcn.004334ac
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 0x409593
mov eax, dword [eax + 4]
jmp 0x409596
add eax, 4
push eax
lea edx, [esp + 0x54]
push str.Khong_the_doc_path_file:__s_n
push edx
call fcn.00433f59
lea eax, [esp + 0x5c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4095b0
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409523
push edi
push eax
lea eax, [esp + 0x58]
push 1
push eax
call fcn.0043386b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432a13
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0xc]
push ecx
call fcn.0040f780
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 0x409631
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 0x409636
call fcn.004334ac
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 0x409654
mov eax, dword [eax + 4]
jmp 0x409657
add eax, 4
lea ecx, [esp + 0x450]
push ecx
push eax
lea edx, [esp + 0x58]
push 0x44d378
push edx
call fcn.00433f59
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 0x409680
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409523
push edi
push eax
lea eax, [esp + 0x58]
push 1
push eax
call fcn.0043386b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432a13
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.0040ec20
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040f780
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x450]
push edx
lea eax, [esp + 0x54]
push 0x44d364
push eax
call fcn.00433f59
lea eax, [esp + 0x5c]
add esp, 0xc
lea edx, [eax + 1]
jmp 0x409700
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409700
mov edi, dword [edi + 4]
sub eax, edx
test edi, edi
je 0x409523
push edi
push eax
lea ecx, [esp + 0x58]
push 1
push ecx
call fcn.0043386b
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.00432a13
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.0040ec20
mov edx, dword [esp + 0x10]
push edx
call fcn.0040f780
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call fcn.00416894
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x58]
push 0x44d354
push ecx
call fcn.00433f59
lea eax, [esp + 0x60]
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409780
sub eax, edx
mov edx, dword [esp + 0x2c]
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x409523
push ecx
jmp 0x4095c7
call fcn.0040ec20
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040f780
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00416894
lea edx, [esp + 0x454]
push edx
lea eax, [esp + 0x58]
push 0x44d364
push eax
call fcn.00433f59
lea eax, [esp + 0x60]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4097e0
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + 4]
sub eax, edx
test ecx, ecx
je 0x409523
push ecx
jmp 0x409513
mov ecx, dword [esp + 0x854]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00432a13
mov esp, ebp
pop ebp
ret 4