Function at 0x46d360
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57b770
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x600f84]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x46d39c
xor eax, eax
jmp 0x46d5c4
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x46d3c5
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x46d3c5
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 1]
mov dword [esi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x46d5c4
cmp dword [esi + 0x54], 0
je 0x46d5c1
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x46d3ed
mov edx, dword [esi + 0x3c]
mov eax, dword [esi + 0x40]
mov dword [ecx], edx
mov ecx, dword [esi + 0x20]
mov dword [ecx], eax
mov edx, dword [esi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [esi + 0x44], 0
jne 0x46d413
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call fcn.0055639f
add esp, 8
cmp eax, 0xffffffff
je 0x46d5c1
mov eax, ebx
jmp 0x46d5c4
push ecx
mov ecx, esp
mov byte [ebp - 0x2d], bl
mov dword [ebp - 0x40], esp
call fcn.00406d50
lea ecx, [ebp - 0x2c]
call fcn.0040a840
push 0
push 0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0040a900
push 0
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040a5a0
test al, al
je 0x46d464
push 0
push 8
push 0
lea ecx, [ebp - 0x2c]
call fcn.00416220
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040a8c0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.0040a9a0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.0041b1a0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040a9a0
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.0041b1a0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.004027a0
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
add eax, edi
lea edi, [ebp - 0x3c]
push edi
push eax
push ebx
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x2d]
push eax
lea eax, [esi + 0x4c]
push eax
call edx
test eax, eax
js 0x46d5b9
cmp eax, 1
jg 0x46d5e2
lea ecx, [ebp - 0x2c]
call fcn.0040a9a0
mov ebx, eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x48]
call fcn.0041b1a0
mov edi, dword [ebp - 0x3c]
sub edi, ebx
mov dword [ebp - 0x48], ebx
je 0x46d529
lea ecx, [ebp - 0x2c]
call fcn.0040a9a0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x40]
mov ebx, eax
call fcn.0041b1a0
mov edx, dword [esi + 0x54]
push edx
push edi
push 1
push ebx
mov dword [ebp - 0x40], ebx
call fcn.005575c3
add esp, 0x10
cmp edi, eax
jne 0x46d5b9
lea eax, [ebp - 0x2d]
mov byte [esi + 0x49], 1
cmp dword [ebp - 0x44], eax
jne 0x46d61b
test edi, edi
jne 0x46d555
lea ecx, [ebp - 0x2c]
call fcn.004027a0
lea ecx, [ebp - 0x2c]
cmp eax, 0x20
jae 0x46d5bc
push edi
push 8
call fcn.004148a0
lea ecx, [ebp - 0x2c]
call fcn.0040a9a0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.0041b1a0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040a9a0
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.0041b1a0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.004027a0
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
add eax, edi
lea edi, [ebp - 0x3c]
push edi
push eax
push ebx
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x2d]
push eax
lea eax, [esi + 0x4c]
push eax
call edx
test eax, eax
jns 0x46d4cf
lea ecx, [ebp - 0x2c]
call fcn.0040a980
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005521f1
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x46d5b9
mov esi, dword [esi + 0x54]
movsx eax, byte [ebp - 0x2d]
push esi
push eax
call fcn.0055639f
add esp, 8
cmp eax, 0xffffffff
je 0x46d60c
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
call fcn.0040a980
mov eax, esi
jmp 0x46d5c4
lea ecx, [ebp - 0x2c]
or esi, 0xffffffff
call fcn.0040a980
mov eax, esi
jmp 0x46d5c4
lea ecx, [ebp - 0x2c]
call fcn.0040a980
mov eax, dword [ebp + 8]
jmp 0x46d5c4