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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xbc
mov esi, dword [esp + 0xd8]
mov dword [esp + 0x18], ecx
mov edi, dword [esp + 0xd0]
mov ebp, dword [esp + 0xd4]
cmp word [esi + 4], 0
je 0x411213
mov dword [esp + 0x28], 0
lea eax, [esp + 0x44]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.0040c0d0
lea eax, [esp + 0x44]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00410430
push eax
push eax
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], ebp
mov ebx, eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call fcn.0047ffe0
cmp word [esp + 0x48], 0
je 0x4111f1
mov dword [esp + 0xd4], ebp
mov dword [esp + 0x2c], 0
mov ebp, edi
mov edi, dword [esp + 0xd4]
lea eax, [esp + 0x50]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0040c0d0
lea eax, [esp + 0x50]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.00410430
push eax
push eax
mov eax, dword [esp + 0x58]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], edi
mov esi, eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x58]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
call fcn.0047ffe0
cmp word [esp + 0x54], 0
je 0x4111c5
xor ebx, ebx
mov dword [esp + 0xd4], edi
mov edi, ebp
mov ebp, ebx
mov ebx, dword [esp + 0xd4]
lea eax, [esp + 0x5c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0040c0d0
lea eax, [esp + 0x5c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00410430
push esi
push esi
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], ebx
mov esi, eax
mov eax, dword [esp + 0x64]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x64]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
call fcn.0047ffe0
cmp word [esp + 0x60], 0
je 0x4111b1
xor esi, esi
mov dword [esp + 0x30], esi
mov esi, ebx
mov ebx, edi
lea eax, [esp + 0x68]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040c0d0
lea eax, [esp + 0x68]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00410430
push ecx
push ecx
mov eax, dword [esp + 0x70]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], esi
mov edi, eax
mov eax, dword [esp + 0x70]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
call fcn.0047ffe0
cmp word [esp + 0x6c], 0
je 0x411191
mov dword [esp + 0x20], 0
mov dword [esp + 0x38], ebp
mov edi, ebx
lea eax, [esp + 0x74]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040c0d0
lea eax, [esp + 0x74]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00410430
push edx
push edx
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], esi
mov ebx, eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call fcn.0047ffe0
cmp word [esp + 0x78], 0
je 0x41116f
xor ebx, ebx
lea eax, [esp + 0x80]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040c0d0
lea eax, [esp + 0x80]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00410430
push eax
push eax
mov eax, dword [esp + 0x88]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], esi
mov ebp, eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebp
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x88]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebp
call sub.msvcrt.dll_fwrite
mov dword [esp], ebp
call fcn.0047ffe0
cmp word [esp + 0x84], 0
je 0x41115f
mov dword [esp + 0x24], 0
lea eax, [esp + 0x8c]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040c0d0
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00410430
push eax
push eax
mov eax, dword [esp + 0x94]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], esi
mov ebp, eax
mov eax, dword [esp + 0x94]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebp
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x94]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebp
call sub.msvcrt.dll_fwrite
mov dword [esp], ebp
call fcn.0047ffe0
cmp word [esp + 0x90], 0
je 0x411140
mov dword [esp + 0x1c], 0
lea ebp, [esp + 0x98]
mov dword [esp + 0x34], ebx
mov dword [esp + 4], ebp
mov dword [esp], esi
call fcn.0040c0d0
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], ebp
mov dword [esp], edi
call fcn.00410430
push eax
push eax
mov eax, dword [esp + 0xa0]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], esi
mov ebx, eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0xa0]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call fcn.0047ffe0
cmp word [esp + 0x9c], 0
je 0x41111d
xor edx, edx
lea eax, [esp + 0xa4]
mov dword [esp], esi
mov dword [esp + 4], eax
mov dword [esp + 0x3c], edx
call fcn.0040c0d0
lea eax, [esp + 0xa4]
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00410430
push eax
push eax
mov eax, dword [esp + 0xac]
mov dword [esp], eax
call fcn.00480010
mov dword [esp + 0xc], esi
mov ebx, eax
mov eax, dword [esp + 0xac]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0xac]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call fcn.0047ffe0
lea eax, [esp + 0xa4]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
mov ecx, dword [esp + 0x18]
call fcn.00410ba0
xor eax, eax
sub esp, 0xc
mov edx, dword [esp + 0x3c]
mov ax, word [esp + 0x9c]
inc edx
cmp edx, eax
jl 0x411061
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
xor eax, eax
mov edx, dword [esp + 0x1c]
mov ax, word [esp + 0x90]
cmp edx, eax
jl 0x410fdb
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x24]
xor eax, eax
inc ebp
mov ax, word [esp + 0x84]
mov dword [esp + 0x24], ebp
mov edx, dword [esp + 0x24]
cmp edx, eax
jl 0x410f36
xor eax, eax
inc ebx
mov ax, word [esp + 0x78]
cmp ebx, eax
jl 0x410e9c
mov ebx, dword [esp + 0x20]
xor eax, eax
inc ebx
mov ax, word [esp + 0x6c]
mov dword [esp + 0x20], ebx
mov ecx, dword [esp + 0x20]
cmp ecx, eax
jl 0x410e1a
mov ebp, dword [esp + 0x38]
mov ebx, edi
mov ecx, dword [esp + 0x30]
xor eax, eax
inc ecx
mov ax, word [esp + 0x60]
mov dword [esp + 0x30], ecx
mov edx, dword [esp + 0x30]
cmp edx, eax
jl 0x410d8c
mov edi, ebx
mov ebx, esi
xor eax, eax
inc ebp
mov ax, word [esp + 0x54]
cmp ebp, eax
jl 0x410d02
mov ebp, edi
mov edi, ebx
mov edx, dword [esp + 0x2c]
xor eax, eax
inc edx
mov ax, word [esp + 0x48]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x2c]
cmp edx, eax
jl 0x410c6e
mov dword [esp + 0xd4], edi
mov edi, ebp
mov ebp, dword [esp + 0xd4]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0xd8]
inc eax
mov dword [esp + 0x28], eax
xor eax, eax
mov ecx, dword [esp + 0x28]
mov ax, word [edx + 4]
cmp eax, ecx
jg 0x410bd6
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret 0xc