Function at 0x4019b0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [esp + 0x84]
mov ebx, dword [esp + 0x8c]
sub eax, 1
cmp eax, ebx
jg 0x4019d6
test eax, eax
mov ebx, 1
cmovg ebx, eax
add ebx, 1
mov dword [esp + 4], 4
mov dword [esp], ebx
call sym._calloc
mov dword [esp], ebx
mov dword [esp + 4], 4
mov ebp, eax
mov dword [esp + 0x34], eax
call sym._calloc
mov ecx, dword [esp + 0x84]
mov dword [esp + 4], 4
mov dword [esp + 0x28], eax
lea esi, [ecx + 1]
mov dword [esp], esi
call sym._calloc
mov dword [esp], ebx
mov dword [esp + 4], 4
mov dword [esp + 0x38], eax
call sym._calloc
lea ecx, [esi*4]
mov dword [esp], ecx
mov edi, eax
mov dword [esp + 0x54], ecx
call sym._malloc
mov dword [esp + 0x50], eax
mov ebx, eax
test ebp, ebp
je 0x401f1c
mov edx, dword [esp + 0x28]
test edx, edx
je 0x401f1c
mov eax, dword [esp + 0x38]
test eax, eax
sete dl
test edi, edi
sete al
or dl, al
jne 0x401f1c
test ebx, ebx
je 0x401f1c
mov eax, dword [esp + 0x50]
mov dword [eax + 8], 2
mov eax, dword [esp + 0x88]
mov dword [esp + 0x10], 0
sub eax, 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], 0xffffffff
call dbg.allocate
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
add eax, 4
mov dword [esp], eax
call dbg.assign
mov dword [esp], 0x5b
call sym._putchar
mov eax, dword [esp + 0x80]
add eax, dword [esp + 0x88]
mov dword [esp + 0x4c], 2
mov dword [esp + 0x3c], eax
mov esi, dword [esp + 0x88]
cmp dword [esp + 0x84], esi
jle 0x401c58
mov dword [esp + 0x2c], edi
mov ebp, esi
nop
cmp dword [esp + 0x8c], ebp
jl 0x401e00
test ebp, ebp
mov eax, 1
cmovg eax, ebp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x88], ebp
mov ebx, 1
mov dword [esp + 0x48], 2
setne byte [esp + 0x33]
lea eax, [eax + ebp*4]
mov dword [esp + 0x40], eax
jmp 0x401b65
add ebx, 1
cmp dword [esp + 0x24], ebx
jl 0x401c2e
cmp ebx, ebp
jg 0x401b84
cmp byte [esp + 0x33], 0
je 0x401b84
mov edi, dword [esp + 0x3c]
mov eax, ebx
neg eax
movzx eax, byte [edi + eax]
cmp byte [edi], al
je 0x401c80
mov eax, dword [esp + 0x2c]
mov dword [eax + ebx*4], 0
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + ebx*4]
test ecx, ecx
je 0x401b58
mov eax, dword [ecx + 8]
mov edi, ebp
sub edi, dword [ecx + 0xc]
lea esi, [eax + 1]
cmp edi, 1
jle 0x401e20
mov eax, edi
mov edx, 1
lea esi, [esi]
sar eax, 1
add edx, 2
cmp eax, 1
jne 0x401bb8
add edx, esi
mov dword [esp + 0x10], ecx
lea esi, [edx + edi*8]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp + 4], ebp
mov dword [esp], esi
call dbg.allocate
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
lea eax, [eax + ebx*4]
mov dword [esp], eax
call dbg.assign
mov eax, dword [esp + 0x38]
mov eax, dword [eax + ebp*4]
test eax, eax
je 0x401c0a
cmp dword [eax + 8], esi
jle 0x401b58
mov eax, dword [esp + 0x34]
mov eax, dword [eax + ebx*4]
add ebx, 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call dbg.assign
cmp dword [esp + 0x24], ebx
jge 0x401b65
imul eax, ebp, 0x32
cdq
idiv dword [esp + 0x84]
cmp eax, dword [esp + 0x4c]
jg 0x401e30
add dword [esp + 0x3c], 1
add ebp, 1
cmp dword [esp + 0x84], ebp
jne 0x401b10
mov dword [esp], 0x405038
call sym._puts
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x54]
mov eax, dword [eax + ecx - 8]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + ebx*4]
test ecx, ecx
jne 0x401d70
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + ebx*4]
lea ecx, [esi + 1]
mov dword [esp + 0x44], esi
mov dword [eax + ebx*4], ecx
cmp ecx, 1
jle 0x401b58
cmp ecx, dword [esp + 0x48]
jg 0x401e69
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x38]
lea edx, [ebx - 1]
mov edi, dword [eax + ecx*4]
mov eax, ebp
sub eax, edi
sar edx, 7
mov ecx, dword [esi + eax*4]
mov eax, dword [ecx + 8]
lea esi, [eax + 8]
lea eax, [edx + 1]
mov edx, 1
je 0x401cea
lea esi, [esi]
nop
sar eax, 1
add edx, 2
cmp eax, 1
jne 0x401ce0
lea eax, [edi - 1]
add edx, esi
mov esi, 1
cmp eax, 1
jle 0x401d0a
lea esi, [esi]
sar eax, 1
add esi, 2
cmp eax, 1
jne 0x401d00
mov eax, dword [esp + 0x28]
add esi, edx
lea edx, [eax + ebx*4]
mov eax, dword [eax + ebx*4]
test eax, eax
je 0x401d23
cmp dword [eax + 0xc], ebp
je 0x401e5b
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], esi
mov dword [esp + 0x44], edx
call dbg.allocate
mov edx, dword [esp + 0x44]
mov dword [esp + 4], eax
mov dword [esp], edx
call dbg.assign
mov eax, dword [esp + 0x38]
mov eax, dword [eax + ebp*4]
test eax, eax
je 0x401d63
cmp dword [eax + 8], esi
jle 0x401b58
mov eax, dword [esp + 0x28]
jmp 0x401c0e
mov eax, dword [ecx + 8]
mov edi, ebp
sub edi, dword [ecx + 0xc]
lea esi, [eax + 1]
cmp edi, 1
jle 0x401f12
mov eax, edi
mov edx, 1
lea esi, [esi]
nop
sar eax, 1
add edx, 2
cmp eax, 1
jne 0x401d90
add esi, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], esi
call dbg.allocate
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
lea eax, [eax + ebx*4]
mov dword [esp], eax
call dbg.assign
mov eax, dword [esp + 0x38]
mov eax, dword [eax + ebp*4]
test eax, eax
je 0x401ddb
cmp dword [eax + 8], esi
jle 0x401c8f
mov eax, dword [esp + 0x28]
mov eax, dword [eax + ebx*4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call dbg.assign
jmp 0x401c8f
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x24], eax
test eax, eax
jg 0x401b2b
jmp 0x401c2e
mov edx, 1
jmp 0x401bc2
mov dword [esp], 0x2e
call sym._putchar
mov dword [esp], 1
call dword [0x40401c]
mov dword [esp], eax
call sym._fflush
add dword [esp + 0x4c], 1
jmp 0x401c43
cmp dword [eax + 8], esi
jle 0x401b58
jmp 0x401d23
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x48]
mov edx, dword [eax + esi*4]
mov esi, dword [esp + 0x38]
mov eax, ebp
sub eax, edx
mov eax, dword [esi + eax*4]
mov esi, dword [eax + 8]
lea eax, [edx - 1]
mov edx, 1
cmp eax, 1
jle 0x401e9a
nop
sar eax, 1
add edx, 2
cmp eax, 1
jne 0x401e90
add edx, esi
mov esi, dword [esp + 0x48]
mov eax, ebp
mov edi, dword [esp + 0x38]
mov dword [esp + 0x58], ebp
mov ebp, dword [esp + 0x50]
sub eax, esi
mov dword [esp + 0x5c], ebx
mov ebx, esi
mov dword [esp + 0x44], ecx
lea edi, [edi + eax*4]
mov ecx, edx
nop
mov edx, dword [edi - 4]
mov eax, ebx
add ebx, 1
mov esi, dword [edx + 8]
mov edx, 1
sar eax, 1
add edx, 2
cmp eax, 1
jne 0x401ed0
add edx, esi
cmp ecx, edx
jl 0x401f08
mov dword [ebp + ebx*4], ebx
mov ecx, edx
sub edi, 4
cmp ebx, dword [esp + 0x44]
jne 0x401ec0
mov ebp, dword [esp + 0x58]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x48], ebx
mov ebx, dword [esp + 0x5c]
jmp 0x401cb3
mov eax, dword [ebp + ebx*4 - 4]
mov dword [ebp + ebx*4], eax
jmp 0x401ee6
mov edx, 1
jmp 0x401d9a
mov dword [esp], 2
call dword [0x40401c]
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x40501c
call sym._fwrite
mov dword [esp], 1
call sym._exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop