Function at 0x401978
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48bb03
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x107c
call 0x44bbc0
mov eax, dword [0x4ae0f0]
xor eax, esp
mov dword [esp + 0x1078], eax
push ebx
push esi
push edi
mov eax, dword [0x4ae0f0]
xor eax, esp
push eax
lea eax, [esp + 0x1090]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
lea esi, [edi + 0x84]
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x14], 0x10
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
mov dword [esi + 0x10], ebx
jb 0x4019e3
mov ecx, dword [esi]
jmp 0x4019e5
mov ecx, esi
push 0x49da9c
push eax
lea eax, [esp + 0x1c]
push eax
mov byte [ecx], bl
call 0x43b11f
add esp, 0xc
cmp dword [esp + 0x14], ebx
jne 0x401a07
xor eax, eax
jmp 0x401d90
push 2
push ebx
push dword [esp + 0x1c]
call 0x43b735
add esp, 0xc
lea eax, [esp + 0x85]
push 0xfff
push ebx
push eax
mov byte [esp + 0x90], bl
call 0x4412b0
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
push 0x1000
lea ecx, [esp + 0x8c]
push ecx
lea ecx, [edi + 0xf4]
mov dword [esp + 0x24], ebx
call 0x40406e
xor ebx, ebx
inc ebx
jmp 0x401d1d
mov eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
test eax, eax
jle 0x401b0c
cmp dword [esp + 0x20], 0
je 0x401be8
push dword [esp + 0x14]
push eax
lea eax, [esp + 0x8c]
push ebx
push eax
call 0x43b2bb
mov ecx, dword [esp + 0x28]
add dword [edi + 0x100], ecx
add esp, 0x10
lea ecx, [esp + 0x6c]
push 0x49e008
call 0x40379d
and dword [esp + 0x1098], 0
lea eax, [esp + 0x6c]
push eax
lea ecx, [edi + 0x9c]
call 0x40270c
push eax
lea ecx, [esp + 0x28]
call fcn.0040260a
or dword [esp + 0x1098], 0xffffffff
lea ecx, [esp + 0x6c]
call fcn.00403aa5
cmp dword [esp + 0x34], ebx
jb 0x401ccc
cmp dword [esp + 0x38], 0x10
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
push eax
call 0x43b032
pop ecx
cmp dword [edi + 0x100], eax
jl 0x401ccc
lea ecx, [esp + 0x24]
call fcn.00403aa5
push dword [esp + 0x14]
call 0x43b3ec
pop ecx
push dword [esp + 0x14]
call 0x43b591
and dword [esp + 0x18], 0
cmp dword [edi + 0x74], 0
pop ecx
je 0x401d64
push 0x49e06c
lea ecx, [esp + 0x40]
call 0x40379d
lea eax, [esp + 0x3c]
push eax
lea ecx, [edi + 0x9c]
mov dword [esp + 0x109c], 2
call 0x40270c
push eax
lea ecx, [esp + 0x58]
call fcn.0040260a
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1098], 4
call fcn.00403aa5
cmp dword [esp + 0x64], ebx
jbe 0x401d53
lea ecx, [edi + 0xf4]
call 0x403dfa
sub esp, 0x18
lea eax, [esp + 0x6c]
mov ecx, esp
push eax
call fcn.0040260a
push dword [edi + 0x74]
mov ecx, edi
call fcn.00401220
cmp dword [edi + 0x1c], 0
je 0x401bbd
lea eax, [edi + 0x20]
cmp dword [eax + 0x14], 0x10
jb 0x401bb2
mov eax, dword [eax]
push dword [edi + 0x38]
mov ecx, edi
push eax
call fcn.0040127a
push ebx
mov ecx, edi
call fcn.004015ad
test eax, eax
je 0x401bd8
push dword [esp + 0x1c]
mov ecx, edi
call fcn.00401978
test eax, eax
jne 0x401bda
xor ebx, ebx
lea ecx, [esp + 0x54]
call fcn.00403aa5
jmp 0x401d8e
lea eax, [esp + 0x84]
push eax
call fcn.00403780
pop ecx
push eax
lea eax, [esp + 0x88]
push eax
mov ecx, esi
call fcn.00403707
push 0x49e218
call fcn.00403780
pop ecx
push eax
push 0
push 0x49e218
mov ecx, esi
call 0x402876
cmp eax, 0xffffffff
je 0x401cd5
lea esi, [eax + 4]
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x2c]
push eax
lea ecx, [edi + 0x84]
call 0x4026de
push esi
push 0
lea eax, [esp + 0x44]
lea esi, [edi + 0x84]
push eax
mov ecx, esi
mov dword [esp + 0x10a4], ebx
call 0x4026de
push eax
mov ecx, esi
call 0x402630
lea ecx, [esp + 0x3c]
call fcn.00403aa5
mov eax, dword [edi + 0x94]
push dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
sub ecx, eax
push ecx
lea ecx, [esp + 0x8c]
add eax, ecx
push ebx
push eax
call 0x43b2bb
add dword [edi + 0x100], eax
add esp, 0x10
mov ecx, edi
call fcn.00401db6
lea eax, [edi + 0xc4]
cmp dword [eax + 0x14], 0x10
jb 0x401cab
mov eax, dword [eax]
push eax
call 0x43b032
pop ecx
cmp eax, 0xc8
jl 0x401d2a
cmp eax, 0x12c
jge 0x401d31
or dword [esp + 0x1098], 0xffffffff
mov dword [esp + 0x20], ebx
lea ecx, [esp + 0x24]
call fcn.00403aa5
mov ecx, edi
call 0x4025be
push 0xfff
lea eax, [esp + 0x89]
push 0
push eax
mov byte [esp + 0x90], 0
call 0x4412b0
and dword [esp + 0x24], 0
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x1000
lea eax, [esp + 0x8c]
push eax
lea ecx, [edi + 0xf4]
call 0x40406e
test eax, eax
jne 0x401a5c
jmp 0x401b0c
cmp eax, 0x12c
jl 0x401d45
cmp eax, 0x190
jge 0x401d45
or dword [esp + 0x1098], 0xffffffff
jmp 0x401b03
lea ecx, [esp + 0x24]
call fcn.00403aa5
jmp 0x401a00
or dword [esp + 0x1098], 0xffffffff
lea ecx, [esp + 0x54]
call fcn.00403aa5
cmp dword [edi + 0x100], 0
push dword [esp + 0x1c]
jg 0x401d7c
call dword [0x48f1d0]
jmp 0x401a00
mov ecx, edi
call 0x402410
lea ecx, [edi + 0xf4]
call 0x403dfa
mov eax, ebx
mov ecx, dword [esp + 0x1090]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1078]
xor ecx, esp
call 0x43a78a
mov esp, ebp
pop ebp
ret 4