Function at 0x41d010
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4984a8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x4bc7dc]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bc7dc]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x50]
mov edi, ecx
cmp ebx, 0xffffffff
jne 0x41d054
xor eax, eax
jmp 0x41d225
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x41d07d
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x41d07d
dec dword [eax]
mov edi, dword [edi + 0x24]
mov eax, dword [edi]
lea ecx, [eax + 1]
mov dword [edi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x41d225
cmp dword [edi + 0x54], 0
je 0x41d222
mov ecx, dword [edi + 0x10]
lea edx, [edi + 0x48]
cmp dword [ecx], edx
jne 0x41d0a5
mov edx, dword [edi + 0x3c]
mov eax, dword [edi + 0x40]
mov dword [ecx], edx
mov ecx, dword [edi + 0x20]
mov dword [ecx], eax
mov edx, dword [edi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [edi + 0x44], 0
jne 0x41d0cb
mov edi, dword [edi + 0x54]
movzx eax, bl
push edi
push eax
call fcn.004825f2
add esp, 8
cmp eax, 0xffffffff
je 0x41d222
mov eax, ebx
jmp 0x41d225
mov ecx, 0xf
xor eax, eax
mov byte [esp + 0x20], 0
mov byte [esp + 0x17], bl
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 8
cmp ecx, 0x10
jae 0x41d0f8
lea eax, [esp + 0x20]
mov byte [eax + 8], 0
mov dword [esp + 0x48], 0
lea ebx, [edi + 0x4c]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x34]
mov edx, eax
cmp ebp, 0x10
jae 0x41d11c
lea edx, [esp + 0x20]
mov eax, edx
add edx, dword [esp + 0x30]
mov ecx, dword [edi + 0x44]
mov esi, dword [ecx]
lea ebp, [esp + 0x18]
push ebp
push edx
push eax
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x2b]
push edx
push ebx
call eax
test eax, eax
js 0x41d211
cmp eax, 1
jg 0x41d1c0
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov ecx, eax
cmp ebp, 0x10
jae 0x41d161
lea ecx, [esp + 0x20]
mov esi, dword [esp + 0x18]
sub esi, ecx
je 0x41d192
cmp ebp, 0x10
jae 0x41d172
lea eax, [esp + 0x20]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call fcn.00482f12
add esp, 0x10
cmp esi, eax
jne 0x41d211
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x17]
mov byte [edi + 0x49], 1
cmp dword [esp + 0x1c], edx
jne 0x41d1fa
test esi, esi
jne 0x41d10f
cmp dword [esp + 0x30], 0x20
jae 0x41d211
push esi
push 8
lea esi, [esp + 0x28]
call fcn.0040b690
jmp 0x41d107
cmp eax, 3
jne 0x41d211
mov edi, dword [edi + 0x54]
movzx eax, byte [esp + 0x17]
push edi
push eax
call fcn.004825f2
add esp, 8
cmp eax, 0xffffffff
je 0x41d1e2
mov esi, dword [esp + 0x50]
jmp 0x41d1e5
or esi, 0xffffffff
lea ecx, [esp + 0x20]
mov dword [esp + 0x48], 0xffffffff
call fcn.0047d500
mov eax, esi
jmp 0x41d225
lea ecx, [esp + 0x20]
mov dword [esp + 0x48], 0xffffffff
call fcn.0047d500
mov eax, dword [esp + 0x50]
jmp 0x41d225
lea ecx, [esp + 0x20]
mov dword [esp + 0x48], 0xffffffff
call fcn.0047d500
or eax, 0xffffffff
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0047fe29
add esp, 0x38
ret 4