Function at 0x47ef40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x4e44b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
mov edx, ecx
mov dword [ebp - 0x24], edx
jne 0x47ef71
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495cb8
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edx + 0x24]
cmp dword [ecx], 0
push esi
je 0x47efaa
mov eax, dword [edx + 0x34]
mov ecx, dword [ecx]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x47efaa
add dword [eax], 0xffffffff
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495cb8
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x47efc9
cmp dword [edx + 0x3c], 0
jne 0x47efde
push eax
movsx eax, bl
push eax
call fcn.0049bed3
add esp, 8
cmp eax, 0xffffffff
jne 0x47ef96
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495cb8
mov esp, ebp
pop ebp
ret 4
mov ecx, 0xf
xor eax, eax
cmp ecx, 0x10
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0x28], bl
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], 8
jae 0x47f004
lea eax, [ebp - 0x1c]
mov byte [eax + 8], 0
push edi
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
nop
cmp edx, 0x10
jb 0x47f22a
test eax, eax
mov ebx, eax
mov dword [ebp - 0x2c], ebx
je 0x47f043
cmp edx, 0x10
mov ecx, eax
jae 0x47f02c
lea ecx, [ebp - 0x1c]
cmp ecx, ebx
ja 0x47f043
cmp edx, 0x10
mov ecx, eax
jae 0x47f03a
lea ecx, [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
add ecx, esi
cmp ebx, ecx
jbe 0x47f04e
call fcn.00496100
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffe
je 0x47f074
cmp edx, 0x10
mov ecx, eax
jae 0x47f060
lea ecx, [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
add ecx, esi
cmp ebx, ecx
jb 0x47f074
call fcn.00496100
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
cmp edx, 0x10
mov edi, dword [ebp - 0xc]
jb 0x47f235
test eax, eax
mov esi, eax
je 0x47f0aa
cmp edx, 0x10
mov ecx, eax
jae 0x47f090
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x47f0aa
cmp edx, 0x10
mov ecx, eax
jae 0x47f09e
lea ecx, [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
add ecx, ebx
cmp esi, ecx
mov ebx, dword [ebp - 0x2c]
jbe 0x47f0b5
call fcn.00496100
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffe
je 0x47f0d3
cmp edx, 0x10
jae 0x47f0c5
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
add eax, edx
cmp esi, eax
jb 0x47f0d3
call fcn.00496100
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [ebp - 0x34]
push eax
add ebx, edi
push ebx
push esi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
add eax, 0x44
push eax
call edx
test eax, eax
jl 0x47f2c7
cmp eax, 1
jg 0x47f24d
mov edx, dword [ebp - 8]
cmp edx, 0x10
mov eax, dword [ebp - 0x1c]
jb 0x47f23d
test eax, eax
mov esi, eax
je 0x47f142
cmp edx, 0x10
mov ecx, eax
jae 0x47f12b
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x47f142
cmp edx, 0x10
mov ecx, eax
jae 0x47f139
lea ecx, [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
add ecx, edi
cmp esi, ecx
jbe 0x47f14d
call fcn.00496100
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffe
je 0x47f173
cmp edx, 0x10
mov ecx, eax
jae 0x47f15f
lea ecx, [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
add ecx, edi
cmp esi, ecx
jb 0x47f173
call fcn.00496100
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x34]
sub edi, esi
je 0x47f1f4
cmp edx, 0x10
jb 0x47f245
test eax, eax
mov esi, eax
je 0x47f1aa
cmp edx, 0x10
mov ecx, eax
jae 0x47f193
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x47f1aa
cmp edx, 0x10
mov ecx, eax
jae 0x47f1a1
lea ecx, [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
add ecx, ebx
cmp esi, ecx
jbe 0x47f1b5
call fcn.00496100
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffe
je 0x47f1d3
cmp edx, 0x10
jae 0x47f1c5
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
add eax, edx
cmp esi, eax
jb 0x47f1d3
call fcn.00496100
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.00497223
add esp, 0x10
cmp edi, eax
jne 0x47f2c7
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
mov byte [ecx + 0x41], 1
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x30], ecx
jne 0x47f2a9
test edi, edi
ja 0x47f010
cmp dword [ebp - 0xc], 0x20
lea ecx, [ebp - 0x20]
jae 0x47f2ca
push 0
push 8
call fcn.0040abd0
jmp 0x47f009
lea ebx, [ebp - 0x1c]
mov dword [ebp - 0x2c], ebx
jmp 0x47f022
lea esi, [ebp - 0x1c]
jmp 0x47f086
lea esi, [ebp - 0x1c]
jmp 0x47f121
lea esi, [ebp - 0x1c]
jmp 0x47f189
cmp eax, 3
jne 0x47f2c7
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x4c]
mov ecx, dword [ebp - 0x28]
push eax
push ecx
call fcn.0047eaa0
add esp, 8
test al, al
je 0x47f289
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x20]
call fcn.004020d0
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495cb8
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
or esi, 0xffffffff
call fcn.004020d0
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495cb8
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
call fcn.004020d0
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495cb8
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
call fcn.004020d0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.00495cb8
mov esp, ebp
pop ebp
ret 4