Function at 0x4b2780
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x50f62f
push eax
mov dword fs:[0], esp
sub esp, 0x3a0
push ebx
push ebp
mov ebp, ecx
push edi
xor edi, edi
cmp dword [ebp + 0x54c], edi
je 0x4b2bc5
lea ecx, [esp + 0xc]
call fcn.004bbd10
mov dword [esp + 0x6c], edi
mov dword [esp + 0xc], 0x5162e8
mov dword [esp + 0x70], 1
mov eax, dword [esp + 0x3bc]
push 0x545eb4
push eax
mov dword [esp + 0x3bc], edi
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, edi
mov dword [esp + 0x7c], eax
jne 0x4b2800
mov dword [esp + 0x3b4], 0xffffffff
jmp 0x4b2bb0
mov ebx, dword [esp + 0x3c0]
push esi
push 0xf001
push 0x501
mov ecx, ebx
mov dword [esp + 0x80], eax
call fcn.004ab080
cmp eax, edi
je 0x4b2874
mov esi, dword [eax + 8]
cmp esi, edi
je 0x4b2874
mov eax, dword [eax + 4]
cmp eax, 0x1ff
jae 0x4b2874
mov ecx, eax
lea edi, [esp + 0x1b0]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x1b0], 0
lea eax, [esp + 0x1b0]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
lea ecx, [esp + 0x10]
shl eax, 0x14
push eax
call fcn.004bbfd0
xor edi, edi
lea ecx, [esp + 0xfc]
push 0x40
push ecx
call fcn.004a9d20
mov al, byte [ebp + 0x4e4]
add esp, 8
lea edx, [esp + 0xf8]
mov ecx, ebp
push edx
push eax
mov dword [esp + 0x100], edi
call fcn.004b4740
test eax, eax
je 0x4b2ac9
lea ecx, [esp + 0x140]
call fcn.004aa6b0
mov esi, 0x515c58
mov dword [esp + 0x140], esi
lea ecx, [esp + 0x88]
mov byte [esp + 0x3b8], 1
call fcn.004aa6b0
mov dword [esp + 0x88], esi
mov edx, dword [ebx]
mov ecx, ebx
mov byte [esp + 0x3b8], 2
call dword [edx + 0xc]
cmp eax, edi
je 0x4b2909
push eax
lea ecx, [esp + 0x8c]
call fcn.004aaab0
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
cmp eax, edi
jne 0x4b28f1
mov ecx, dword [esp + 0xf8]
inc ecx
push ecx
call sub.MFC42.DLL_operatornew
mov ebx, eax
lea edi, [esp + 0x100]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.MFC42.DLL_operatornew
mov edx, eax
add esp, 8
mov dword [esp + 0x84], edx
test edx, edx
mov byte [esp + 0x3b8], 3
je 0x4b297d
push 1
push ebx
mov edi, ebx
or ebx, 0xffffffff
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10
push 2
mov ecx, edx
call fcn.004aa010
mov esi, eax
jmp 0x4b2982
xor esi, esi
or ebx, 0xffffffff
push 0x10
push 2
lea ecx, [esp + 0x90]
mov byte [esp + 0x3c0], 2
call fcn.004ab080
test eax, eax
push esi
je 0x4b29bc
mov ecx, eax
call fcn.004ab3c0
test esi, esi
je 0x4b29c8
mov ecx, esi
call fcn.004aa050
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4b29c8
lea ecx, [esp + 0x8c]
call fcn.004aaab0
mov eax, dword [ebp]
lea ecx, [esp + 0x88]
push 2
push ecx
mov ecx, ebp
call dword [eax + 0x74]
lea ecx, [esp + 0x88]
call fcn.004aad70
mov esi, eax
test esi, esi
je 0x4b2a27
cmp word [esi], 2
jne 0x4b2a01
push esi
lea ecx, [esp + 0x144]
call fcn.004aaab0
jmp 0x4b2a15
test esi, esi
je 0x4b2a15
mov ecx, esi
call fcn.004aa050
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x88]
call fcn.004aad70
mov esi, eax
test esi, esi
jne 0x4b29ec
mov edx, dword [ebp]
lea eax, [esp + 0x10]
push 0x65
lea ecx, [esp + 0x144]
push eax
push ecx
mov ecx, ebp
call dword [edx + 0x68]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1b0]
lea edx, [esp + 0x230]
rep stosd dword es:[edi], eax
mov edi, str.DICM
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x1b0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x80]
push ecx
push 0x84
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
lea ecx, [esp + 0x10]
call fcn.004bc1b0
lea ecx, [esp + 0x88]
mov byte [esp + 0x3b8], 1
call fcn.004aa730
lea ecx, [esp + 0x140]
mov byte [esp + 0x3b8], 0
call fcn.004aa730
xor edi, edi
jmp 0x4b2acc
or ebx, 0xffffffff
mov eax, dword [ebp + 0x468]
mov dword [ebp + 0x4d4], edi
cmp eax, edi
pop esi
je 0x4b2b3c
lea eax, [esp + 0xc]
lea ecx, [ebp + 0x460]
push eax
push ebp
call fcn.004c1e70
test eax, eax
je case.0x4b2b5a.3
cmp dword [ebp + 0x4d4], edi
jle 0x4b2b3c
lea ecx, [esp + 0xc]
mov dword [ebp + 0x520], edi
call fcn.004bc1b0
lea ecx, [esp + 0xc]
call fcn.004ab810
lea ecx, [esp + 0xc]
mov dword [esp + 0x3b4], ebx
mov dword [esp + 0xc], 0x51633c
mov dword [esp + 0x6c], edi
call fcn.004bbda0
mov eax, 1
jmp 0x4b2bc7
lea ecx, [esp + 0x78]
push ecx
mov ecx, ebp
call fcn.004bbfe0
mov edx, dword [esp + 0x78]
and edx, 0xff
lea eax, [edx - 1]
cmp eax, 6
ja case.0x4b2b5a.3
jmp dword [eax*4 + 0x4b2c0c]
lea eax, [esp + 0xc]
lea ecx, [ebp + 0x460]
push eax
push ebp
call fcn.004c1e70
test eax, eax
je case.0x4b2b5a.3
cmp dword [ebp + 0x4d4], edi
jg 0x4b2afe
jmp 0x4b2b3c
push ebp
lea ecx, [ebp + 0x60]
call fcn.004c5a30
push ebp
lea ecx, [ebp + 0x450]
call fcn.004c73d0
lea ecx, [ebp + 0x530]
call fcn.004bba40
lea ecx, [esp + 0xc]
call fcn.004ab810
mov dword [esp + 0x3b4], ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0x51633c
mov dword [esp + 0x6c], edi
call fcn.004bbda0
xor eax, eax
mov ecx, dword [esp + 0x3ac]
pop edi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3ac
ret 8
push ebp
lea ecx, [ebp + 0x240]
call fcn.004c7b40
jmp case.0x4b2b5a.3
push ebp
lea ecx, [ebp + 0x430]
call fcn.004c7230
push ebp
lea ecx, [ebp + 0x440]
call fcn.004c72c0
jmp case.0x4b2b5a.6