Function at 0x401d10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov eax, 0x18dc
push edi
push esi
push ebx
call fcn.00426860
mov dword [esp + 4], 4
mov edx, dword [0x42e270]
xor esi, esi
inc edx
mov dword [esp], edx
call fcn.0040ddf0
mov dword [esp + 0x68], eax
mov edx, dword [0x42eaf0]
mov dword [esp + 4], 4
mov dword [esp], edx
call fcn.0040ddf0
mov dword [esp + 0x5c], eax
mov eax, dword [0x429c50]
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
cmp esi, eax
jg 0x401d85
xor ebx, ebx
xor ecx, ecx
mov dword [esp + esi*4 + 0x10b0], ebx
mov dword [esp + esi*4 + 0x14c0], ecx
inc esi
cmp esi, eax
jle 0x401d6e
xor esi, esi
cmp esi, dword [0x42e270]
jg 0x401da3
mov edi, dword [esp + 0x68]
mov dword [edi + esi*4], 0
inc esi
cmp esi, dword [0x42e270]
jle 0x401d8f
mov eax, dword [0x42dde0]
test eax, eax
jne 0x402872
call fcn.00425860
mov ecx, dword [0x429bb0]
test ecx, ecx
jne 0x401ddb
mov edx, dword [0x42ddb0]
cmp dword [0x42f8d0], edx
mov esi, edx
je 0x40280f
test ecx, ecx
je 0x402776
mov eax, dword [0x42ddb0]
xor esi, esi
cmp esi, eax
jg 0x401df4
xor ebx, ebx
mov dword [esp + esi*4 + 0xca0], ebx
inc esi
cmp esi, eax
jle 0x401de6
mov dword [esp + 8], 0
lea esi, [esp + 0xca0]
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.00425c00
mov edi, dword [0x429c30]
mov dword [edi], 0
mov ebp, dword [0x42dcd0]
mov esi, 1
add ebp, ebp
mov dword [esp + 0x40], ebp
cmp esi, ebp
mov dword [esp + 0x4c], ebp
jg 0x401f72
mov dword [esp + 0x74], 1
mov ebp, esi
mov ecx, esi
shr ebp, 0x1f
lea edx, [ebp + esi]
sar edx, 1
lea edi, [edx + edx]
sub ecx, edi
mov ebx, ecx
dec ebx
je 0x402760
mov ecx, dword [0x42ac70]
mov ebp, dword [0x429c40]
mov ebx, dword [ecx + edx*4]
mov dword [esp + 4], ebx
mov edi, dword [ebp + edx*4]
mov dword [esp], edi
call fcn.0040fc30
mov ecx, dword [esp + 0x74]
mov ebx, dword [esp + 0x5c]
mov dword [ebx + ecx*4], eax
mov edi, dword [esp + 0x68]
lea edx, [esp + 0x74]
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], edx
lea ebx, [esp + 0x7c]
lea ebp, [esp + 0x78]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ebp
mov dword [esp + 8], edi
mov dword [esp], eax
call fcn.004017a0
mov dword [esp + 0x5c], eax
mov ebx, dword [esp + 0x7c]
lea ecx, [esp + 0x70]
mov dword [esp + 0x14], ecx
mov ebp, dword [esp + 0x78]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004028c0
test eax, eax
je 0x401f67
inc dword [esp + 0x44]
mov ecx, dword [0x429c90]
mov edi, dword [esp + 0x78]
add dword [0x429bd0], edi
mov ebx, dword [esp + 0x74]
add dword [0x42a100], ebx
test ecx, ecx
mov dword [esp + 0x3c], edi
je 0x401f67
test edi, edi
jle 0x401f67
mov ecx, 1
cmp ecx, ebx
jg 0x401f67
mov edx, dword [0x42abf0]
mov eax, dword [0x42dd60]
mov ebp, dword [0x42eb10]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x38], eax
mov edx, dword [esp + 0x5c]
mov edi, dword [esp + 0x2c]
mov eax, dword [edx + ecx*4]
mov edx, dword [edi + eax*4]
mov edi, dword [ebp + eax*4]
cmp edx, 1
je 0x401f62
mov eax, dword [esp + 0x38]
cmp dword [eax + edi*4], 1
je 0x402710
inc ecx
cmp ecx, ebx
jle 0x401f3d
inc esi
cmp esi, dword [esp + 0x40]
jle 0x401e3c
mov esi, dword [0x429bb0]
test esi, esi
je 0x4026b2
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0x48], ecx
jge 0x40220c
mov dword [esp + 0x54], 0
mov eax, dword [0x42ddb0]
mov esi, 1
mov dword [esp + 0x50], 0
cmp esi, eax
jg 0x401fbe
lea esi, [esi]
xor edx, edx
mov dword [esp + esi*4 + 0xca0], edx
inc esi
cmp esi, eax
jle 0x401fb0
inc dword [esp + 0x48]
mov ebx, dword [0x42eaa0]
mov edi, dword [0x42eb30]
mov edx, dword [esp + 0x48]
mov eax, dword [0x42dde0]
mov ebp, dword [ebx + edx*4]
mov dword [esp + 0x70], edx
test eax, eax
mov esi, dword [edi + edx*4]
mov dword [esp + 0x58], ebp
mov dword [esp + 0x64], esi
jne 0x402690
mov edx, dword [esp + 0x58]
lea edi, [esp + 0x14c0]
mov eax, dword [esp + 0x64]
mov dword [esp + 8], edi
lea esi, [esp + 0x10b0]
mov edi, 1
mov dword [esp], edx
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
call fcn.00402e30
mov edx, dword [0x42ddb0]
cmp edi, edx
jg 0x4020a9
lea esi, [esi]
mov ebp, dword [esp + edi*4 + 0x14c0]
test ebp, ebp
je 0x4020a4
mov eax, dword [esp + edi*4 + 0x10b0]
xor ecx, ecx
mov dword [esp + edi*4 + 0x14c0], ecx
test eax, eax
je 0x4024e5
mov ebp, dword [0x42dde0]
mov ebx, dword [esp + eax*4 + 0xca0]
test ebp, ebp
mov dword [esp + edi*4 + 0xca0], ebx
jne 0x4024b9
xor esi, esi
jmp 0x402080
inc esi
cmp dword [esp + esi*4 + 0x480], ebx
jne 0x402080
inc dword [esp + esi*4 + 0x890]
inc dword [0x42dce0]
inc dword [esp + 0x50]
xor esi, esi
mov dword [esp + edi*4 + 0x10b0], esi
inc edi
cmp edi, edx
jle 0x402030
mov edi, dword [0x42dd10]
test edi, edi
je 0x40210e
mov ecx, dword [0x42a190]
test ecx, ecx
jne 0x40210e
mov esi, 0x41
mov ecx, 0x61
mov esi, esi
lea edi, [edi]
mov edx, dword [esp + esi*4 + 0xca0]
test edx, edx
jne 0x4024b0
mov eax, dword [esp + ecx*4 + 0xca0]
test eax, eax
je 0x402497
inc dword [esp + 0x50]
lea esi, [esi]
lea edi, [edi]
mov dword [esp + esi*4 + 0xca0], eax
inc ecx
inc esi
cmp esi, 0x5a
jle 0x4020d0
mov eax, dword [esp + 0x50]
mov ebx, dword [esp + 0x70]
add dword [0x42dd70], eax
cmp ebx, dword [esp + 0x4c]
jle 0x40214b
mov ebp, dword [0x429c30]
lea esi, [esp + 0xca0]
mov edx, dword [ebp + ebx*4]
test edx, edx
jne 0x40214b
inc dword [0x42eac0]
mov ecx, dword [0x429cc0]
test ecx, ecx
jne 0x402357
mov ecx, dword [0x42eb40]
test ecx, ecx
je 0x402178
mov edx, dword [0x42f790]
xor eax, eax
mov ebp, dword [esp + 0x70]
mov esi, dword [esp + edx*4 + 0xca0]
mov dword [ecx + ebp*4], esi
mov edi, dword [0x42f790]
mov dword [esp + edi*4 + 0xca0], eax
mov ebx, dword [0x42a0f0]
test ebx, ebx
jne 0x4022f3
mov ecx, dword [0x429bb0]
test ecx, ecx
jne 0x4022cf
mov ecx, dword [esp + 0x70]
cmp ecx, dword [0x429c70]
je 0x4022aa
mov esi, 1
xor edx, edx
xor ebx, ebx
cmp esi, dword [esp + 0x54]
jg 0x4021db
lea esi, [esi]
lea edi, [edi]
mov eax, dword [esp + esi*4 + 0x890]
cmp eax, edx
jle 0x4021d4
mov ebx, dword [esp + esi*4 + 0x480]
mov edx, eax
inc esi
cmp esi, dword [esp + 0x54]
jle 0x4021c0
mov dword [esp + 0x10], edx
lea esi, [esp + 0xca0]
mov edx, dword [esp + 0x50]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp], esi
call fcn.00424860
mov ebx, dword [esp + 0x44]
cmp dword [esp + 0x48], ebx
jl 0x401f8e
mov ecx, dword [0x42a0f0]
test ecx, ecx
jne 0x4022a0
mov edi, dword [0x429bb0]
test edi, edi
je 0x402247
mov edx, dword [esp + 0x68]
mov dword [esp], edx
call fcn.0041ad20
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call fcn.0041ad20
add esp, 0x18dc
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00424b40
mov edx, dword [0x42a990]
test edx, edx
jle 0x402299
mov edi, dword [edx*4 + 0x42a1c0]
mov ecx, dword [edx*4 + 0x42eb60]
mov ebx, dword [edx*4 + 0x42e290]
mov dword [esp + 0xc], edi
mov esi, dword [edx*4 + 0x42ac80]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.00425a60
mov ebp, dword [0x42a990]
dec ebp
test ebp, ebp
mov dword [0x42a990], ebp
mov edx, ebp
jg 0x402256
call fcn.004258f0
jmp 0x402224
call fcn.0040e280
jmp 0x402224
mov dword [esp + 0xc], 0xffff8002
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ecx
call fcn.004255a0
jmp 0x4021fe
mov eax, dword [esp + 0x50]
lea edi, [esp + 0xca0]
mov ebp, dword [esp + 0x70]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
call fcn.00425c00
jmp 0x4021fe
mov dword [esp], 0x401bf3
call fcn.0040ec90
mov eax, dword [0x429c70]
cmp dword [esp + 0x70], eax
je 0x402353
mov dword [esp], eax
mov esi, 1
call fcn.0040e640
cmp esi, dword [esp + 0x60]
jge 0x40233d
mov eax, dword [esp + esi*4 + 0xca0]
test eax, eax
jne 0x40232e
mov eax, dword [esp + 0x70]
neg eax
mov dword [esp], eax
inc esi
call fcn.0040e640
cmp esi, dword [esp + 0x60]
jl 0x40231d
call fcn.0040e390
mov dword [esp], 0x401bf9
call fcn.0040ec90
jmp 0x4021fe
neg eax
jmp 0x40230a
mov dword [esp + 8], ebx
mov edi, dword [0x42ab70]
mov dword [esp + 4], 0x401c01
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
mov dword [esp + 4], ebx
mov ebx, dword [0x42ab70]
mov dword [esp], ebx
call fcn.00401600
mov ecx, dword [0x429c50]
xor edx, edx
mov ebx, dword [0x42ab70]
cmp edx, ecx
jge 0x4023b3
mov eax, dword [edx*4 + 0x42f8d0]
test eax, eax
js 0x402490
mov ebp, dword [esi + eax*4]
mov dword [esp + edx*4 + 0x80], ebp
inc edx
cmp edx, ecx
jl 0x402395
mov dword [esp + 0xc], ebx
lea esi, [esp + 0x80]
mov dword [esp + 8], 0x12
mov dword [esp + 4], 1
mov dword [esp], 0x401c1f
call sub.msvcrt.dll_fwrite
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.004014a0
mov ecx, dword [0x429c50]
xor edx, edx
cmp edx, ecx
jge 0x40240b
xor eax, eax
cmp dword [esp + edx*4 + 0x80], 0
sete al
mov dword [esp + edx*4 + 0x80], eax
inc edx
cmp edx, ecx
jl 0x4023f2
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
mov dword [esp], 0x401c32
call sub.msvcrt.dll_fwrite
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.004014a0
mov esi, dword [ebx + 4]
dec esi
test esi, esi
mov dword [ebx + 4], esi
js 0x40247b
mov edx, dword [ebx]
mov byte [edx], 0xa
inc dword [ebx]
mov edx, dword [0x42ab70]
mov ecx, dword [edx + 4]
dec ecx
mov dword [edx + 4], ecx
test ecx, ecx
js 0x402466
mov ebx, dword [edx]
mov byte [ebx], 0xa
inc dword [edx]
jmp 0x40214b
mov dword [esp + 4], edx
mov dword [esp], 0xa
call sub.msvcrt.dll__flsbuf
jmp 0x40214b
mov dword [esp + 4], ebx
mov dword [esp], 0xa
call sub.msvcrt.dll__flsbuf
jmp 0x402449
neg eax
jmp 0x4023a4
test edx, edx
je 0x402100
test eax, eax
jne 0x402100
dec dword [esp + 0x50]
jmp 0x402100
mov eax, dword [esp + ecx*4 + 0xca0]
jmp 0x402497
mov dword [esp + 0xc], ebx
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x401c4a
add edx, 0x40
mov dword [esp], edx
call sub.msvcrt.dll_fprintf
mov edx, dword [0x42ddb0]
jmp 0x40206f
mov dword [esp + 8], edi
mov esi, dword [esp + 0x5c]
lea ebp, [esp + 0x78]
mov ebx, dword [esp + 0x64]
mov eax, dword [esp + 0x58]
mov dword [esp + 0xc], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00402ca0
mov dword [esp + 0x74], eax
mov esi, dword [esp + 0x68]
lea ecx, [esp + 0x7c]
mov dword [esp + 0x10], ecx
mov ebx, dword [esp + 0x5c]
lea edx, [esp + 0x74]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.004017a0
mov dword [esp + 0x5c], eax
mov ebp, dword [esp + 0x7c]
lea ecx, [esp + 0x6c]
mov dword [esp + 0x14], ecx
mov esi, dword [esp + 0x78]
mov eax, dword [esp + 0x68]
mov dword [esp + 0x10], ebp
mov edx, dword [esp + 0x74]
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.004028c0
test eax, eax
je 0x4025e3
inc dword [esp + 0x44]
mov edx, dword [0x429c90]
mov eax, dword [esp + 0x78]
add dword [0x429bd0], eax
mov ebx, dword [esp + 0x74]
add dword [0x42a100], ebx
test edx, edx
mov dword [esp + 0x34], eax
je 0x4025e3
test eax, eax
jle 0x4025e3
mov ecx, 1
cmp ecx, ebx
jg 0x4025e3
mov ebp, dword [0x42abf0]
mov eax, dword [0x42dd60]
mov dword [esp + 0x2c], ebp
mov ebp, dword [0x42eb10]
mov dword [esp + 0x30], eax
mov esi, dword [esp + 0x5c]
mov eax, dword [esi + ecx*4]
mov esi, dword [esp + 0x2c]
mov edx, dword [esi + eax*4]
mov esi, dword [ebp + eax*4]
cmp edx, 1
je 0x4025de
mov eax, dword [esp + 0x30]
cmp dword [eax + esi*4], 1
je 0x40264b
inc ecx
cmp ecx, ebx
jle 0x4025bd
mov ecx, dword [0x42dde0]
mov eax, dword [esp + 0x6c]
test ecx, ecx
mov dword [esp + edi*4 + 0xca0], eax
jne 0x402628
inc dword [esp + 0x54]
mov esi, 1
inc dword [0x42a1b0]
mov edx, dword [esp + 0x54]
mov dword [esp + edx*4 + 0x890], esi
mov ebp, dword [esp + 0x6c]
mov dword [esp + edx*4 + 0x480], ebp
mov edx, dword [0x42ddb0]
jmp 0x402097
mov dword [esp + 0xc], eax
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x401c4a
add ebx, 0x40
mov dword [esp], ebx
call sub.msvcrt.dll_fprintf
jmp 0x4025f8
cmp edx, 2
jne 0x4025de
mov eax, 1
cmp eax, dword [esp + 0x34]
jg 0x4025de
mov edx, dword [esp + 0x68]
test byte [edx + eax*4 + 1], 0x40
jne 0x402672
inc eax
cmp eax, dword [esp + 0x34]
jle 0x40265b
jmp 0x4025de
mov ebx, dword [0x42dd20]
mov ecx, dword [ebx + esi*4]
mov dword [esp], 0x401c52
mov dword [esp + 4], ecx
call fcn.004128b0
jmp 0x4025e3
mov dword [esp + 8], edx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], 0x401c6d
add ecx, 0x40
mov dword [esp], ecx
call sub.msvcrt.dll_fprintf
jmp 0x401ff1
mov dword [esp + 0x14], 0x429c70
mov ebp, dword [esp + 0x68]
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebp
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.004028c0
test eax, eax
je 0x402702
inc dword [0x429bd0]
mov ebx, dword [esp + 0x40]
inc dword [esp + 0x44]
inc ebx
mov dword [esp + 0x4c], ebx
jmp 0x401f80
mov dword [esp], 0x401c90
call fcn.0040e470
jmp 0x4026ea
cmp edx, 2
jne 0x401f62
mov eax, 1
cmp eax, dword [esp + 0x3c]
jg 0x401f62
mov edx, dword [esp + 0x68]
test byte [edx + eax*4 + 1], 0x40
jne 0x40273f
inc eax
cmp eax, dword [esp + 0x3c]
jle 0x402728
jmp 0x401f62
mov ebp, dword [0x42dd20]
mov edx, dword [ebp + edi*4]
mov dword [esp], 0x401c52
mov dword [esp + 4], edx
call fcn.004128b0
jmp 0x401f67
mov edi, dword [0x42ac70]
mov ebx, dword [esp + 0x5c]
mov ecx, dword [edi + edx*4 + 4]
mov dword [ebx + 4], ecx
jmp 0x401e89
mov ebp, dword [0x42a0f0]
test ebp, ebp
je 0x401e1f
mov edx, dword [0x42eb40]
test edx, edx
je 0x402802
mov eax, dword [0x42ddb0]
mov dword [esp + 0x60], eax
mov ecx, dword [0x42ac50]
mov edi, dword [esp + 0x60]
test ecx, ecx
mov dword [esp + 8], edi
je 0x4027fb
mov eax, 0x401cbc
mov dword [esp + 4], eax
mov dword [esp], 0x401cd0
call fcn.0040ebc0
mov dword [esp], 0x401bf3
call fcn.0040ec90
mov esi, dword [esp + 0x60]
test esi, esi
jle 0x4027e5
mov esi, dword [esp + 0x60]
mov dword [esp], 0
call fcn.0040e640
dec esi
jne 0x4027d6
call fcn.0040e390
mov dword [esp], 0x401bf9
call fcn.0040ec90
jmp 0x401e1f
mov eax, 0x401cf8
jmp 0x4027ae
mov ebx, dword [0x42ddb0]
inc ebx
mov dword [esp + 0x60], ebx
jmp 0x402797
mov ebx, dword [0x429c50]
cmp edx, ebx
sete al
movzx edx, al
mov eax, dword [0x42a0f0]
test eax, eax
je 0x40283d
test edx, edx
jne 0x402845
mov eax, 1
cmp eax, ebx
jg 0x40283d
cmp esi, eax
je 0x40286b
add eax, eax
cmp eax, ebx
jle 0x402833
test edx, edx
je 0x401dd3
mov dword [esp + 4], 4
mov ecx, dword [0x42dcf0]
mov dword [esp], ecx
call fcn.0040ddf0
mov dword [0x42eb40], eax
mov ecx, dword [0x429bb0]
jmp 0x401dd3
mov edx, 1
jmp 0x40283d
mov edx, dword [0x42ac70]
mov ebp, dword [edx + 4]
mov dword [esp], ebp
call fcn.0040f960
mov dword [esp + 8], 0xd
mov esi, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], 1
mov dword [esp], 0x401cfe
add esi, 0x40
mov dword [esp + 0xc], esi
call sub.msvcrt.dll_fwrite
jmp 0x401db0